<!--
 * @Author: xugj
 * @Date: 2020-07-24 09:51:11
 * @LastEditTime: 2020-07-24 19:52:55
 * @LastEditors: Please set LastEditors
 * @Description: 单页分类 -> 添加/编辑单页分类
 * @FilePath: /XBMemberWeb/content-management/single-page/single-page-classification-add.html
--> 

<!DOCTYPE html>
<html lang="en" xmlns:width="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,address=no">
    <title>网站管理</title>
    <link rel="stylesheet" href="../../icon/iconfont.css">
    <link rel="stylesheet" href="../../plugins/layui/css/layui.css">
    <link rel="stylesheet" href="../../css/nanoscroller.css">
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="../../css/style.css">
    <script src="../../js/JQuery2.1.4.js"></script>
    <script src="../../plugins/layui/layui.js"></script>
    <script src="../../js/spin.min.js"></script>
    <script src="../../js/loading.js"></script>

</head>

<body>
<div class="wrap-box">
    <p class="title-h1"><a href="single-page-classification.html">单页分类</a><span>/</span><span id="addEdit">添加单页分类</span></p>
    <div class="language-exchange">
        <div>
            <a data-id="1" class="language-btn active" href="javascript:;">英语</a>
            <a data-id="2" class="language-btn" href="javascript:;">法语</a>
            <a data-id="3" class="language-btn" href="javascript:;">日语</a>
        </div>
    </div>
    <div class="content-scroll-box content-scroll-box3 content-scroll-box-border nano">
        <form class="content-scroll nano-content ajax-form" onsubmit="return false;">
            <div class="item-box no-pdt" data-translate="true" data-id="1">
                <p class="item-title">分类名称<span class="xing">*</span></p>
                <div class="item">
                    <p class="input">
                        <input type="text"
                               class="check-input"
                               name=""
                               maxlength="200"
                               data-length="200"
                               data-lengthText="分类名称不能超过200字符"
                               data-empty="请输入分类名称"/>
                    </p>
                </div>
            </div>
            <div class="item-box no-pdt" data-translate="true" data-id="2" style="display: none;">
                <p class="item-title">分类名称<span class="xing">*</span></p>
                <div class="item">
                    <p class="input">
                        <input type="text"
                               class="check-input"
                               name=""
                               maxlength="200"
                               data-length="200"
                               data-lengthText="分类名称不能超过200字符"
                               data-empty="请输入分类名称"/>
                    </p>
                </div>
            </div>
            <div class="item-box no-pdt" data-translate="true" data-id="3" style="display: none;">
                <p class="item-title">分类名称<span class="xing">*</span></p>
                <div class="item">
                    <p class="input">
                        <input type="text"
                               class="check-input"
                               name=""
                               maxlength="200"
                               data-length="200"
                               data-lengthText="分类名称不能超过200字符"
                               data-empty="请输入分类名称"/>
                    </p>
                </div>
            </div>
            <div class="item-box item-btn">
                <button type="submit" class="layui-btn ajax-form-commit">保存</button>
                <button type="button" class="layui-btn layui-btn-primary-blue ajax-form-translate">翻译</button>
                <a href="single-page-classification.html" class="layui-btn layui-btn-primary-blue">返回</a>
            </div>
        </form>
    </div>
</div>

<script src="../../js/echarts.min.js"></script>
<script src="../../js/jquery.nanoscroller.js"></script>
<script src="../../js/check.js"></script>
<script src="../../js/common.js"></script>
<script src="../../js/form-commit.js"></script>

<script>
    let type = getQueryVariable("type");
    if (type == 'add'){
        $('#addEdit').text('添加单页分类');
    }else{
        $('#addEdit').text('编辑单页分类');
    }
    
    function getQueryVariable(variable)
    {
           var query = window.location.search.substring(1);
           var vars = query.split("&");
           for (var i=0;i<vars.length;i++) {
                   var pair = vars[i].split("=");
                   if(pair[0] == variable){return pair[1];}
           }
           return(false);
    }
    </script>

</body>

</html>